﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OnlineMovieTicket.Model;
using OnlineMovieTicket.Data.IRepository;
using OnlineMovieTicket.Data.Repository;
using OnlineMovieTicket.Services.IServices;

namespace OnlineMovieTicket.Services.Services
{
    public class MovieReviewService: IMovieReviewService
    {
        IMovieReviewRepository dataRepo;

        public MovieReviewService()
        {
            dataRepo = new MovieReviewRepository();
        }
    
        public IList<MovieReview>  GetMovieReviews()
        {
            return dataRepo.GetReviews();
        }

        public IList<MovieReview> GetMovieReviews(int MovieCode)
        {
            return dataRepo.GetReviews(MovieCode);
        }

        public void SaveMovieReview(MovieReview movieReview, int mode)
        {
            dataRepo.Save(movieReview, mode);
        }
    }
}
